package com.jgp.service.impl;

import com.jgp.dao.BookDao;
import com.jgp.domain.Book;
import com.jgp.service.BookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class BookServiceimpl implements BookService {
    @Autowired
    private BookDao bookDao;
    public boolean save(Book book) {
        bookDao.save(book);
        return true;
    }

    public boolean updata(Book book) {
        bookDao.updata(book);
        return true;
    }

    public boolean delete(Integer id) {
        bookDao.delete(id);
        return true;
    }

    public Book getbyid(Integer id) {
        return bookDao.getbyid(id);

    }

    public List<Book> getall() {
       return bookDao.getall();

    }
}
